package kr.hkit.password.dao;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import kr.hkit.password.dto.ChangeItem;
import android.app.Application;
import android.util.Log;

public class InfoDao extends Application {
	private String account;
	private ArrayList<String> list;
	private ArrayList<ChangeItem> changeList;
	private boolean isAlarmUse;
	private boolean isLogin;
	private boolean isMain;
	private String url;
	private static final String TAG = "PW";
	public static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd-hh");
	public static final String[] CYCLE = {"10초", "1일", "3일", "7일", "15일", "30일"};
	
	@Override
	public void onCreate() {
		super.onCreate();
		Log.d(TAG, "Info onCreate()");
		account = "guest";
		isLogin = false;
		isMain = false;
	}
	
	public boolean isLogin() {
		return isLogin;
	}

	public void setLogin(boolean isLogin) {
		this.isLogin = isLogin;
		if (!isLogin) account = "guest";
	}

	public boolean isMain() {
		return isMain;
	}

	public void setMain(boolean isMain) {
		this.isMain = isMain;
	}

	public boolean isAlarmUse() {
		return isAlarmUse;
	}

	public void setAlarmUse(boolean isAlarmUse) {
		this.isAlarmUse = isAlarmUse;
	}

	public String getDate(Date d) {
		String date = SDF.format(d);
		return date;
	}
	
	public ArrayList<ChangeItem> getChangeList() {
		return changeList;
	}

	public void setChangeList(ArrayList<ChangeItem> changeList) {
		this.changeList = changeList;
	}


	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public ArrayList<String> getList() {
		return list;
	}

	public void setList(ArrayList<String> list) {
		this.list = list;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

}
